package com.xinzhi.controller;

import com.xinzhi.service.JiaFenShenSuService;
import com.xinzhi.service.ReasonforService;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class JiaFenShenSuController {
    @Autowired
    private JiaFenShenSuService jiaFenShenSuService;
    @Autowired
    private ReasonforService reasonforService;

    /**
     * 特殊加分申诉审核查询接口
     * @return
     */
    @GetMapping("/selectJiafenShenSu")
    public Result selectJiafenShenSu() {
        return jiaFenShenSuService.selectJia();
    }


    /**
     * 特殊加分申诉审核删除接口
     */
    @PostMapping("/deleteJiafenShenSu")
    public Result deleteJiafenShenSu(String causeofappeal,Integer deleted) {
        return jiaFenShenSuService.deleteJia(causeofappeal,deleted);
    }


    /**
     * 特殊加分申诉审核根据发布状态查询
     */


    @GetMapping("/selectfabuJiafenShenSu")
    public Result selectfabuJiafenShenSu(String publishstatus) {
        return jiaFenShenSuService.selectpublish(publishstatus);
    }

    /**
     * 特殊加分申诉审核的查询接口
     */

    @GetMapping("/selectappraisal")
    public Result selectappraisal(){
        return reasonforService.selectappraisal();
    }


    /**
     * 特殊加分申诉审核逻辑删除接口
     */

    @PostMapping("/delete")
    public Result delete(String Causeofappeal,Integer deleted){
        return reasonforService.updateReasonfor(Causeofappeal,deleted);
    }
}
